import axios from '@/utils/axios'

// 查询列表
export function listUser(query) {
  return axios({
    url: '/system/user/list',
    method: 'get',
    params: query
  })
}

// 新增用户
export function addUser(data) {
  return axios({
    url: '/system/user/add',
    method: 'post',
    data: data
  })
}

// 修改用户
export function updateUser(data) {
  return axios({
    url: '/system/user/update',
    method: 'post',
    data: data
  })
}

// 删除用户
export function deleteUser(userId) {
  return axios({
    url: '/system/user/' + userId,
    method: 'delete'
  })
}

// 查询用户详细
export function getUserInfo(userId) {
  return axios({
    url: '/system/user/getUserById/' + userId,
    method: 'get'
  })
}
